<include file="public/header" />
<link rel="stylesheet" href="__ADMIN__/plugins/layui/iconpick.css" media="all" />
</head>
<body>
<div style="margin: 15px;" class="user-main">
	<div class="user-title">
		<span class="fl">编辑菜单</span>
		<div class="fr">
			<a href="{:url('Menu/index')}"><button type="button" class="layui-btn-normal layui-btn-small bn write borderr5 cu" ><i class=" fa fa-reply"></i></button></a>
		</div>
		<div class="clear"></div>
	</div>
	 <form class="layui-form mt20 J_ajaxForm"  action="{:url('Menu/edit')}"  method="post">

	<input type="hidden"  name="id"    value="{$data.id}">
	<input type="hidden"  name="app" value="Htsoft">
	
			<div class="layui-form-item">
				<label class="layui-form-label">上级名称:</label>
				<div class="layui-input-inline">
					<select name="parentid"  lay-search>
						<option value="0">作为一级菜单</option> 
						{$select_categorys}
					</select>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label"><span class="red">* </span>名称:</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input layui-wd"  name="name" value="{$data.name}">
				</div>
			</div>
		 <div class="layui-form-item">
			 <label class="layui-form-label">图标</label>

			 <div class="layui-inline layui-wd" style="width: 50%">
				 <input type="text" lay-verify="required" lay-vertype="tips" name="icon" placeholder="图标" readonly
						id="iconpick" value="{$data.icon}" class="layui-input">
			 </div>
			 <div class="layui-inline">
				 <a class="layui-btn layui-btn-primary fl-l mr-5 icon-pick" style="width: 41px;padding: 0 10px;"><i
						 class="{$data.icon}" style="font-size:18px;color:#76838f;"></i></a>
			 </div>
		 </div>
			<div class="layui-form-item">
				<label class="layui-form-label"><span class="red">* </span>模块:</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input layui-wd"  name="model" id="model" value="{$data.model}">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label"><span class="red">* </span>方法:</label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input layui-wd"  name="action" id="action" value="{$data.action}">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">状态:</label>
				<div class="layui-input-inline">
					<select name="status">
					  	<option value="1" name="data.status">显示</option>
						<php>$status_selected=empty($data['status'])?"selected":"";</php>
					  	<option value="0" name="data.status" {$status_selected}>隐藏</option>
					</select>
				</div>
			</div>

			<div class="layui-input-block mt20">
				<a class="layui-btn layui-btn-normal" href="{:url('Menu/index')}">返回列表</a>
				<a class="layui-btn layui-btn-danger J_ajax_submit_savebtn"  >确认保存</a> 
		    </div> 		
	</form>
</div>
<include file="public/footer" />
</body>
<script type="text/javascript">
    layui.config({
        base: '__ADMIN__/plugins/layui/'
    }).extend({
        iconpick: 'iconpick'
    });
    layui.use(['layer','iconpick'],function() {
        let form = layui.form,
            iconpick = layui.iconpick;


        $("#iconpick").on('click', function (e) {
            $(".icon-pick").click();
            e.stopPropagation();
        });

        iconpick.pickinit('icon-pick', 'iconpick');
    });
</script>
</html>